LATEX= pdflatex
BIBTEX = bibtex
BMR= beamer
ART= article
PICDIR= tikz-proofs
EXEC= evince
RM= rm -rf
CD= cd

all:
	$(MAKE) proofs
	$(MAKE) beamer
	$(MAKE) article

proofs:
	$(CD) $(PICDIR) ; make

beamer:
	$(LATEX) $(BMR) 
	$(BIBTEX) $(BMR)
	$(LATEX) $(BMR)
	$(LATEX) $(BMR)

article:
	$(LATEX) $(ART) 
	$(BIBTEX) $(ART)
	$(LATEX) $(ART)
	$(LATEX) $(ART)

run:
	$(MAKE) all
	$(EXEC) $(BMR).pdf &
	$(EXEC) $(ART).pdf &

disp:
	$(EXEC) $(BMR).pdf &
	$(EXEC) $(ART).pdf &

clean:
	$(CD) $(PICDIR) ; make clean
	$(RM) $(BMR).aux $(BMR).bbl $(BMR).blg $(BMR).log \
	$(BMR).out $(BMR).toc $(BMR).nav $(BMR).snm $(BMR).bib
	$(RM) $(ART).aux $(ART).bbl $(ART).blg $(ART).log \
	$(ART).out $(ART).toc $(ART).bib
